﻿@model IEnumerable<FILSTARTUPS_CMS.Models.UserGrid>

@{
    WebGrid webGrid = new WebGrid(canSort: true, canPage: true, rowsPerPage: 8, ajaxUpdateContainerId: "grid");
    webGrid.Bind(Model, autoSortAndPage: true, rowCount: Model.Count());
    
 }
 <div id="grid">
@webGrid.GetHtml(htmlAttributes: new { id = "grid" },
alternatingRowStyle: "altrow",
mode: WebGridPagerModes.All,
    firstText: "<<first",
    previousText: "<previous",
    nextText: "next >",
    lastText: "last >>",
    columns: webGrid.Columns(
    webGrid.Column("Username", "Username", format: @<b>@item.username</b>),
    webGrid.Column("Firstname", "Firstname", format: @<b>@item.firstname</b>),
    webGrid.Column("Lastname", "Lastname", format: @<b>@item.lastname</b>),
    webGrid.Column("Role", "Role", format: @<b>@item.rolename</b>),
    webGrid.Column(header: "Action",
            style: "action",
            format: (item) => new HtmlString("" + "" +
            Html.ActionLink("Edit", "Edit", new { id = item.useridPK }))
            )))
</div>
